package com.wtwd.campus.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wtwd.campus.entity.OrgExpiration;
import com.wtwd.campus.entity.WarningRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WarningRecordMapper {
    //新增一笔记录
    Integer addWarningRecord(@Param("record") WarningRecord record);

    //新增一批组织过期提醒
    Integer addOrgExpirationList(@Param("list") List<OrgExpiration> list);

    //获取未读的组织提醒
    List<OrgExpiration> getUnReadOrgExpirationMess();


    //获取未读信息的条数
    Integer getUnReadCount();

    //分页查询全部消息
    Page<OrgExpiration> queryOrgExpirationByPage(@Param("page")Page<List<OrgExpiration>> page);

    //将所有的消息都变成已读
    Integer updateIfRead();




}
